package learningtests;

import org.junit.Test;
import static org.junit.Assert.*;

public class StringBuilderLearning {

    @Test
    public void testTrimToSize() {
        final int BUFFER_SIZE = 2000;
        String testString = "this is a test string";
        
        StringBuilder builder = new StringBuilder(BUFFER_SIZE);
        builder.append(testString);      
        
        System.out.println("StringBuilder's size before trimming: ");
        System.out.println(builder.length());
               
        assertEquals(testString.length(), builder.toString().length());
    }
    
}
